{% extends 'base.html' %}

{% block content %}

<html lang='en'>
<head>
    <meta charset="UTF-8">
    <title>Myblog</title>
</head>

{% comment %}
轮播图
{% endcomment %}


        {% comment %} 推荐文章列表 {% endcomment %}
        {% for t in tui %}
        <div class="caption">
            <h4><a href="{% url 'index' %}show-{{t.id}}.html" title="{{t.title}}" rel="bookmark">{{t.title}}</a></h4>
            <p>{{t.excerpt|truncatechars:'80'}}</p>

            {% endfor %}
        </div>
        <div>
            <ul>
                <h4>Blog教程目录：</h4>
                {% for list in list %}
                <li>{{ list }}</li>
                {% endfor %}
            </ul>
        </div>

        <div>
            <ul>
                <h4>所有文章：</h4>
                {% for article in allarticle %}
                <div class='article-box clearfix excerpt-1'>
                    <div class="col-md-4">
                        <div class="thumbnail">
                            <a href="{% url 'index' %}show-{{article.id}}.html" title="{{article.title}}">
                                <img src="media/{{article.img}}" srcset="media/{{article.img}}"
                                     alt="{{article.title}}" class="wp-post-image" width="240" height="160"/></a>
                        </div>
                    </div>
                    <div class="col-md-8">
                        <h2><a href="{% url 'index' %}show-{{article.id}}.html" target="_blank"
                               title="{{article.title}}">{{article.title}}</a>
                        </h2>
                        <p class="txtcont hidden-xs"><a href="{% url 'index' %}show-{{article.id}}.html" target="_blank"
                                                        title="{{article.title}}">{{article.excerpt}}</a></p>
                        <div class="meta"><span class="label label-info"><a
                                href="{% url 'index' %}list-{{article.category.id}}.html">
                    {{article.category.name}}</a></span>
                            <time class="item">
                                <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 26 26"
                                     fill="none" stroke="#8f8a8a" stroke-width="1.5" stroke-linecap="round"
                                     stroke-linejoin="round"
                                     class="icon icon-tabler icons-tabler-outline icon-tabler-clock">
                                    <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
                                    <path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"/>
                                    <path d="M12 7v5l3 3"/>
                                </svg>
                                {{article.created_time|date}}
                            </time>
                            访问量：{{ article.views }}
                        </div>
                    </div>
                </div>


                <li>
                    标题：{{ article.title }}<br/>
                    栏目：{{ article.category }}<br/>
                    作者：{{ article.user }}<br/>
                    时间：{{ article.created_time }}<br/>
                </li>

                {% endfor %}
            </ul>
        </div>


        {% comment %}
        热门文章
        {% endcomment %}

        {% for h in hot %}
        <li><a href="{% url 'index' %}show-{{h.id}}.html" title="{{h.title}}">{{h.titl}}</a></li>
        {% endfor %}


        {% endblock content %}
        <div>
            <ul>
                <h4>Blog 信息：</h4>
                {% for key,values in mydict.items %}
                <li>{{key}}:{{values}}</li>
                {% endfor %}
            </ul>
        </div>


        {% comment %}
        友链
        {% endcomment %}
        <ul class="clear">
            {% for l in link %}
            <li><a href="{{l.linkurl}}" target="_blank">{{l.name}}</a></li>

            {% endfor %}
        </ul>
        </body>
</html>